#pragma once

#include <map>

#define LANGUAGE_FILE_EXT TEXT(".clng")

class CLanguage
{
public:
  static bool Initialize();
  static void Terminate();

  static const TCHAR* Get(const TCHAR* key);
  static const TCHAR* GetFmt(const TCHAR* key, ...);

protected:

  static bool LoadStrings(const TCHAR* szFile);

protected:
  typedef std::map<CString, CString> CLangMap;

  static CLangMap s_langMap;
};

#define LANG(key)  CLanguage::Get(TEXT(key))
#define LANGF      CLanguage::GetFmt